home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1998 August / PC Direct August 1998.iso / S / powerj / Product / hpp.z / WOLEBSTR.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-25  |  2.5 KB  |  99 lines

  1. /*************************************************************************
  2.  *
  3.  * WBString -- OLE BString
  4.  *
  5.  *
  6.  *   Events:
  7.  *
  8.  *
  9.  *************************************************************************/
  10.  
  11. #ifndef _WOLEBSTR_HPP_INCLUDED
  12. #define _WOLEBSTR_HPP_INCLUDED
  13.  
  14. #ifndef _WNO_PRAGMA_PUSH
  15. #pragma pack(push,8);
  16. #pragma enum int;
  17. #endif
  18.  
  19. #ifndef _WSTRING_HPP_INCLUDED
  20. #  include "wstring.hpp"
  21. #endif
  22. #ifndef _WBUFFER_HPP_INCLUDED
  23. #  include "wbuffer.hpp"
  24. #endif
  25.  
  26. #ifndef _WOLETYPE_HPP_INCLUDED
  27. #  include "woletype.hpp"
  28. #endif
  29. //typedef long char * WBStr;
  30.  
  31. class WCMCLASS WBString {
  32.  
  33.     public:
  34.  
  35.         /**********************************************************
  36.          * Constructors and Destructors
  37.          *********************************************************/
  38.  
  39.         WBString( void );
  40.         WBString( const WChar * const str );
  41.         WBString( WBStr wbstr );
  42.         WBString( const WString & wstring );
  43.         WBString( const WBuffer & buffer );
  44.         WBString( const WBString & wbstr );
  45.         WBString( WULong size, WUnicodeChar *buffer );
  46.  
  47.         virtual ~WBString();
  48.  
  49.         /**************************************************************
  50.          * Properties
  51.          **************************************************************/
  52.  
  53.         WUInt GetLength( void ) const;
  54.         WUInt GetByteLength( void ) const;
  55.  
  56.         // Handle
  57.         WBStr GetHandle( void ) const;
  58.         WBool SetHandle( WBStr wbstr );
  59.  
  60.         /**************************************************************
  61.          * Methods
  62.          **************************************************************/
  63.  
  64.         void Clear( void );
  65.  
  66.         WBStr CopyHandle( void ) const;
  67.  
  68.         static void FreeString( WBStr bstr );
  69.  
  70.         /**************************************************************
  71.          * Operators
  72.          **************************************************************/
  73.  
  74.         WBString & operator=( const WBString & bstr );
  75.         WBString & operator=( WBStr wbstr );
  76.  
  77.         // cast operators
  78.         operator WString() const;
  79.         operator WBuffer() const;
  80.         operator WBStr() const;
  81.  
  82.     public:
  83.  
  84.         /**********************************************************
  85.          * Data Members
  86.          *********************************************************/
  87.     
  88.         WBStr   _bstring;
  89.  
  90. };
  91.  
  92. #ifndef _WNO_PRAGMA_PUSH
  93. #pragma enum pop;
  94. #pragma pack(pop);
  95. #endif
  96.  
  97. #endif // _WOLEBSTR_HPP_INCLUDED
  98.  
  99.